﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace Nirvana
{

    /// <summary>
    /// 扩大UI点击区域
    /// </summary>
    public sealed class UIBlock : Graphic, ICanvasRaycastFilter
    {

        public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera)
        {
            return true;
        }
        /// <summary>
        /// 清除所有顶点
        /// </summary>
        /// <param name="vh"></param>
        protected override void OnPopulateMesh(VertexHelper vh)
        {
            vh.Clear();
        }

        /// <summary>
        /// 不渲染texture
        /// </summary>
        public override Texture mainTexture
        {
            get
            {
                return null;
            }
        }
        /// <summary>
        /// 不传送mat去渲染
        /// </summary>
        public override Material materialForRendering
        {
            get
            {
                return null;
            }
        }
    }
}

